#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "savebythread.h"

#include <QMainWindow>
#include <QAction>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onSaveTempFile();
    void on_tableWidget_cellChanged(int row, int column);

    void on_pushButton_clicked();

    void onInsertAboveCurrentRow();
    void onInsertBelowCurrentRow();
    void onDeleteCurrentRow();

private:
    Ui::MainWindow *ui;

    SaveByThread *saveByThread;

    QTimer *saveTempTimer;
    bool m_isModified;
    int m_counter;

    QAction *insertAboveAction;
    QAction *insertBelowAction;
    QAction *deleteRowAction;
};
#endif // MAINWINDOW_H
